import Datastore from 'nedb'
import path from 'path'
import { remote } from 'electron'



const db = {

  slavedata : new Datastore({
    autoload: true,
    filename: path.join(remote.app.getPath('userData'), '/slavedata.db')
  }),

  cfg: new Datastore({
    autoload: true,
    filename: path.join(remote.app.getPath('userData'), '/cfg.db')
  })
}
export default db
// mac下的存储路径 
//  ~/Library/Application Support/electron/data.db
